import React from 'react'
import {Button,Form,Input} from "antd-mobile"
import { useNavigate } from 'react-router-dom'

function Home() {
    const navigate=useNavigate();
    const onFinish=(value)=>{
        console.log(value)
        navigate('/list',{state:value})
    }
  return (
    <div>
      <Form initialValues={{start:"北京",end:"三亚"}} onFinish={onFinish} layout='horizontal' footer={
          <Button block type='submit' color='primary' size='large'>
            查询
          </Button>
        }>
        <Form.Item label='开始' name='start'>
            <Input placeholder='开始目的'></Input>
        </Form.Item>
        <Form.Item label='结束' name='end'>
            <Input placeholder='结束目的'></Input>
        </Form.Item>
      </Form>
    </div>
  )
}

export default Home
